package com.endoc.livedatabuslearn;

import androidx.lifecycle.ViewModel;
import androidx.lifecycle.ViewModelProvider;
import androidx.lifecycle.ViewModelStoreOwner;



public class LiveDataViewModel extends ViewModel {
     static LiveDataViewModel liveDataViewModel;
     public static LiveDataViewModel getInstance(ViewModelStoreOwner owner){
          if(liveDataViewModel==null){
               synchronized (LiveDataViewModel.class){
                     liveDataViewModel = new ViewModelProvider(owner).get(LiveDataViewModel.class);
               }
          }
          return liveDataViewModel;
     }
     String data;
     Person person;
}
